package net.wangds.auth.module.impls.defaults;

import lombok.Getter;
import lombok.Setter;
import net.wangds.auth.module.Grant;
import net.wangds.auth.module.Role;
import net.wangds.data.impl.IdCreate;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import java.util.ArrayList;
import java.util.List;

@MappedSuperclass
public class DefaultRole extends IdCreate implements Role {
    private static final long serialVersionUID = 0;
    /**
     * 角色头像.
     */
    @Setter
    @Getter
    private String avatar;
    /**
     * 角色名称.
     */
    @Setter
    @Getter
    private String roleName;

    /**
     * 角色代码.
     */
    @Setter
    @Getter
    private String roleCode;
    /**
     * 角色描述.
     */
    @Setter
    @Getter
    private String roleDesc;

    /**
     * 角色权限列表.
     */
    @Setter
    @Getter
    transient
    private List<Grant> privileges = new ArrayList<>();

    @Setter
    @Getter
    @Column
    private long orderWeight=0;

}
